<?php
phpinfo();
die();
/**
 * https://github.com/spatie/array-to-xml
 */
require_once "../vendor/autoload.php";
use Spatie\ArrayToXml\ArrayToXml;
$array = [
    'Good guy' => [
        'name' => [
            '_cdata' => '<h1>Luke Skywalker</h1>'
        ],
        'weapon' => 'Lightsaber'
    ],
    'Bad guy' => [
        'name' => '<h1>Sauron</h1>',
        'weapon' => 'Evil Eye'
    ]
];

$result = ArrayToXml::convert($array);
print_r($result);
die();